Integrand size = 23, antiderivative size = 88 \[ \int \frac {\cos ^3(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\frac {b^2 \text {arctanh}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a-b)^{5/2} d}+\frac {(a-2 b) \sin (c+d x)}{(a-b)^2 d}-\frac {\sin ^3(c+d x)}{3 (a-b) d} \]
(a-2*b)*sin(d*x+c)/(a-b)^2/d-1/3*sin(d*x+c)^3/(a-b)/d+b^2*arctanh(sin(d*x+ c)*(a-b)^(1/2)/a^(1/2))/(a-b)^(5/2)/d/a^(1/2)
Time = 0.59 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.31 \[ \int \frac {\cos ^3(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\frac {\frac {6 b^2 \left (-\log \left (\sqrt {a}-\sqrt {a-b} \sin (c+d x)\right )+\log \left (\sqrt {a}+\sqrt {a-b} \sin (c+d x)\right )\right )}{\sqrt {a} (a-b)^{5/2}}+\frac {3 (3 a-7 b) \sin (c+d x)}{(a-b)^2}+\frac {\sin (3 (c+d x))}{a-b}}{12 d} \]
((6*b^2*(-Log[Sqrt[a] - Sqrt[a - b]*Sin[c + d*x]] + Log[Sqrt[a] + Sqrt[a - b]*Sin[c + d*x]]))/(Sqrt[a]*(a - b)^(5/2)) + (3*(3*a - 7*b)*Sin[c + d*x]) /(a - b)^2 + Sin[3*(c + d*x)]/(a - b))/(12*d)
Time = 0.31 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.94, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 4159, 300, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^3(c+d x)}{a+b \tan ^2(c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sec (c+d x)^3 \left (a+b \tan (c+d x)^2\right )}dx\) |
\(\Big \downarrow \) 4159 |
\(\displaystyle \frac {\int \frac {\left (1-\sin ^2(c+d x)\right )^2}{a-(a-b) \sin ^2(c+d x)}d\sin (c+d x)}{d}\) |
\(\Big \downarrow \) 300 |
\(\displaystyle \frac {\int \left (\frac {b^2}{(a-b)^2 \left (a-(a-b) \sin ^2(c+d x)\right )}-\frac {\sin ^2(c+d x)}{a-b}+\frac {a-2 b}{(a-b)^2}\right )d\sin (c+d x)}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {b^2 \text {arctanh}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a-b)^{5/2}}-\frac {\sin ^3(c+d x)}{3 (a-b)}+\frac {(a-2 b) \sin (c+d x)}{(a-b)^2}}{d}\) |
((b^2*ArcTanh[(Sqrt[a - b]*Sin[c + d*x])/Sqrt[a]])/(Sqrt[a]*(a - b)^(5/2)) + ((a - 2*b)*Sin[c + d*x])/(a - b)^2 - Sin[c + d*x]^3/(3*(a - b)))/d
3.5.54.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Int [PolynomialDivide[(a + b*x^2)^p, (c + d*x^2)^(-q), x], x] /; FreeQ[{a, b, c , d}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && ILtQ[q, 0] && GeQ[p, -q]
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_ ))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f Subst[Int[ExpandToSum[b*(ff*x)^n + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 - ff^2 *x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f} , x] && IntegerQ[(m - 1)/2] && IntegerQ[n/2] && IntegerQ[p]
Time = 2.27 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.11
method | result | size |
derivativedivides | \(\frac {-\frac {\frac {a \sin \left (d x +c \right )^{3}}{3}-\frac {b \sin \left (d x +c \right )^{3}}{3}-\sin \left (d x +c \right ) a +2 \sin \left (d x +c \right ) b}{\left (a -b \right )^{2}}+\frac {b^{2} \operatorname {arctanh}\left (\frac {\left (a -b \right ) \sin \left (d x +c \right )}{\sqrt {a \left (a -b \right )}}\right )}{\left (a -b \right )^{2} \sqrt {a \left (a -b \right )}}}{d}\) | \(98\) |
default | \(\frac {-\frac {\frac {a \sin \left (d x +c \right )^{3}}{3}-\frac {b \sin \left (d x +c \right )^{3}}{3}-\sin \left (d x +c \right ) a +2 \sin \left (d x +c \right ) b}{\left (a -b \right )^{2}}+\frac {b^{2} \operatorname {arctanh}\left (\frac {\left (a -b \right ) \sin \left (d x +c \right )}{\sqrt {a \left (a -b \right )}}\right )}{\left (a -b \right )^{2} \sqrt {a \left (a -b \right )}}}{d}\) | \(98\) |
risch | \(-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} a}{8 \left (a -b \right )^{2} d}+\frac {7 i {\mathrm e}^{i \left (d x +c \right )} b}{8 \left (a -b \right )^{2} d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} a}{8 \left (a -b \right )^{2} d}-\frac {7 i {\mathrm e}^{-i \left (d x +c \right )} b}{8 \left (a -b \right )^{2} d}+\frac {b^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{\sqrt {a^{2}-a b}}-1\right )}{2 \sqrt {a^{2}-a b}\, \left (a -b \right )^{2} d}-\frac {b^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{\sqrt {a^{2}-a b}}-1\right )}{2 \sqrt {a^{2}-a b}\, \left (a -b \right )^{2} d}+\frac {\sin \left (3 d x +3 c \right )}{12 \left (a -b \right ) d}\) | \(235\) |
1/d*(-1/(a-b)^2*(1/3*a*sin(d*x+c)^3-1/3*b*sin(d*x+c)^3-sin(d*x+c)*a+2*sin( d*x+c)*b)+b^2/(a-b)^2/(a*(a-b))^(1/2)*arctanh((a-b)*sin(d*x+c)/(a*(a-b))^( 1/2)))
Time = 0.30 (sec) , antiderivative size = 276, normalized size of antiderivative = 3.14 \[ \int \frac {\cos ^3(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\left [\frac {3 \, \sqrt {a^{2} - a b} b^{2} \log \left (-\frac {{\left (a - b\right )} \cos \left (d x + c\right )^{2} - 2 \, \sqrt {a^{2} - a b} \sin \left (d x + c\right ) - 2 \, a + b}{{\left (a - b\right )} \cos \left (d x + c\right )^{2} + b}\right ) + 2 \, {\left (2 \, a^{3} - 7 \, a^{2} b + 5 \, a b^{2} + {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{6 \, {\left (a^{4} - 3 \, a^{3} b + 3 \, a^{2} b^{2} - a b^{3}\right )} d}, -\frac {3 \, \sqrt {-a^{2} + a b} b^{2} \arctan \left (\frac {\sqrt {-a^{2} + a b} \sin \left (d x + c\right )}{a}\right ) - {\left (2 \, a^{3} - 7 \, a^{2} b + 5 \, a b^{2} + {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{3 \, {\left (a^{4} - 3 \, a^{3} b + 3 \, a^{2} b^{2} - a b^{3}\right )} d}\right ] \]
[1/6*(3*sqrt(a^2 - a*b)*b^2*log(-((a - b)*cos(d*x + c)^2 - 2*sqrt(a^2 - a* b)*sin(d*x + c) - 2*a + b)/((a - b)*cos(d*x + c)^2 + b)) + 2*(2*a^3 - 7*a^ 2*b + 5*a*b^2 + (a^3 - 2*a^2*b + a*b^2)*cos(d*x + c)^2)*sin(d*x + c))/((a^ 4 - 3*a^3*b + 3*a^2*b^2 - a*b^3)*d), -1/3*(3*sqrt(-a^2 + a*b)*b^2*arctan(s qrt(-a^2 + a*b)*sin(d*x + c)/a) - (2*a^3 - 7*a^2*b + 5*a*b^2 + (a^3 - 2*a^ 2*b + a*b^2)*cos(d*x + c)^2)*sin(d*x + c))/((a^4 - 3*a^3*b + 3*a^2*b^2 - a *b^3)*d)]
Timed out. \[ \int \frac {\cos ^3(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {\cos ^3(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(b-a>0)', see `assume?` for more details)Is
Leaf count of result is larger than twice the leaf count of optimal. 161 vs. \(2 (78) = 156\).
Time = 0.52 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.83 \[ \int \frac {\cos ^3(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\frac {\frac {3 \, b^{2} \arctan \left (-\frac {a \sin \left (d x + c\right ) - b \sin \left (d x + c\right )}{\sqrt {-a^{2} + a b}}\right )}{{\left (a^{2} - 2 \, a b + b^{2}\right )} \sqrt {-a^{2} + a b}} - \frac {a^{2} \sin \left (d x + c\right )^{3} - 2 \, a b \sin \left (d x + c\right )^{3} + b^{2} \sin \left (d x + c\right )^{3} - 3 \, a^{2} \sin \left (d x + c\right ) + 9 \, a b \sin \left (d x + c\right ) - 6 \, b^{2} \sin \left (d x + c\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}}}{3 \, d} \]
1/3*(3*b^2*arctan(-(a*sin(d*x + c) - b*sin(d*x + c))/sqrt(-a^2 + a*b))/((a ^2 - 2*a*b + b^2)*sqrt(-a^2 + a*b)) - (a^2*sin(d*x + c)^3 - 2*a*b*sin(d*x + c)^3 + b^2*sin(d*x + c)^3 - 3*a^2*sin(d*x + c) + 9*a*b*sin(d*x + c) - 6* b^2*sin(d*x + c))/(a^3 - 3*a^2*b + 3*a*b^2 - b^3))/d
Time = 15.04 (sec) , antiderivative size = 251, normalized size of antiderivative = 2.85 \[ \int \frac {\cos ^3(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\frac {\frac {2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (a-2\,b\right )}{a^2-2\,a\,b+b^2}+\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (a-4\,b\right )}{3\,\left (a^2-2\,a\,b+b^2\right )}+\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (a-2\,b\right )}{a^2-2\,a\,b+b^2}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}-\frac {b^2\,\mathrm {atan}\left (\frac {2{}\mathrm {i}\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^3-6{}\mathrm {i}\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b+6{}\mathrm {i}\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a\,b^2-2{}\mathrm {i}\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^3}{\sqrt {a}\,{\left (a-b\right )}^{5/2}\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}\right )\,1{}\mathrm {i}}{\sqrt {a}\,d\,{\left (a-b\right )}^{5/2}} \]
((2*tan(c/2 + (d*x)/2)*(a - 2*b))/(a^2 - 2*a*b + b^2) + (4*tan(c/2 + (d*x) /2)^3*(a - 4*b))/(3*(a^2 - 2*a*b + b^2)) + (2*tan(c/2 + (d*x)/2)^5*(a - 2* b))/(a^2 - 2*a*b + b^2))/(d*(3*tan(c/2 + (d*x)/2)^2 + 3*tan(c/2 + (d*x)/2) ^4 + tan(c/2 + (d*x)/2)^6 + 1)) - (b^2*atan((a^3*tan(c/2 + (d*x)/2)*2i - b ^3*tan(c/2 + (d*x)/2)*2i + a*b^2*tan(c/2 + (d*x)/2)*6i - a^2*b*tan(c/2 + ( d*x)/2)*6i)/(a^(1/2)*(a - b)^(5/2)*(tan(c/2 + (d*x)/2)^2 + 1)))*1i)/(a^(1/ 2)*d*(a - b)^(5/2))